home *** CD-ROM | disk | FTP | other *** search
- /*
- * Copyright 1993, 1994, Silicon Graphics, Inc.
- * All Rights Reserved.
- *
- * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
- * the contents of this file may not be disclosed to third parties, copied or
- * duplicated in any form, in whole or in part, without the prior written
- * permission of Silicon Graphics, Inc.
- *
- * RESTRICTED RIGHTS LEGEND:
- * Use, duplication or disclosure by the Government is subject to restrictions
- * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
- * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
- * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
- * rights reserved under the Copyright Laws of the United States.
- */
- #ifdef DEBUG
- #include <malloc.h>
- #endif
- #define PGHEIGHT 10.0
- #define PGWIDTH 10.0
- /*
- #define PI 3.14159
- */
- #define PICBUFSIZ 60
- #define ICONLIMIT 20
- #define FRONT 1
- #define BACK 0
-
- struct polylist{
- int *ndcs;
- int type; /* TMP variable for debugging */
- int poly; /* the index into morecolors for the color of the polygon*/
- int line; /* the index into morecolors for the color of the line*/
- }; /* if the index is less than 0, dont draw it */
-
- struct iconstruct{ /* used to display icons/page of the currently opened */
- /* book. on a page, the list of icons per page, list */
- /* of icons to display. */
- long ok; /* if all of the files are here show icon */
- struct icntmpltstruct *iconptr;
- struct iconstruct *nexticon;
- short xposition_ndx;
- short yposition_ndx;
- int iconnum;
- };
-
- struct pagestruct{ /* holds all information per page of current opened book */
- struct iconstruct *fronticons;
- struct iconstruct *backicons;
- struct markerstruct *markerptr;
- struct pagestruct *prevpage;
- struct pagestruct *nextpage;
- int pgnum;
- int direction;
- int frontnumicons;
- int backnumicons;
- };
-
- struct pagelist{
- struct pagestruct *pageptr;
- struct pagelist *next;
- };
-
- struct indexlist{ /* struct of a given element in the MASTER ICON LIST--see */
- /* icntmpltstruct--and MASTER KEYWORD LIST (see wordlist) */
- struct pagelist *found_on_page;
- struct grptmpltstruct *group;/*points to group if this is group name */
- struct icntmpltstruct *icon;/* points to icon if this is icon name */
- struct grpliststruct *grps; /* list of groups with this keyword */
- struct iconstruct *icons; /* list of demos with this keyword */
- struct indexlist *next;
- short num; /* used when writing file */
- short count; /* keesp track of the number of times this word is used */
- char *string;
- };
-
- struct wordlist{
- struct indexlist *indexptr;
- struct wordlist *next;
- };
-
- struct filestruct{
- long ok; /* if all of the files are here show icon */
- struct icntmpltstruct *icon; /* points to the first icon that uses
- this file, if the file gets re-used,
- the poly pointer in the icon struct
- also gets re-used. */
- struct filestruct *next;
- int occurences;
- short count;
- Boolean written;
- char *name;
- };
-
- struct filelist{
- struct filestruct *file;
- struct filelist *next;
- };
-
- struct icntmpltstruct{ /* struct contains all information about a */
- /* given icon/demo used by struct indexlist */
- unsigned long *tex_image;
- long tex_id;
- long tex_width, tex_height;
- long ok; /* if all of the files are here show icon */
- struct polylist *poly;
- struct wordlist *keywords;
- struct indexlist *nameptr;
- struct indexlist *infoptr;
- struct filestruct *geofile;
- struct filestruct *imgfile;
- struct filestruct *helpfile;
- struct filelist *addtlfiles;
- struct icntmpltstruct *nexticntmplt;
- struct grpliststruct *grps;
- float xsize;
- float bbox[4][3];
- short numkey;
- int numpoly;
- int occurences;
- int iconnum;
- char *startstring;
- char *alt_command;
- char filetype;
- };
-
- struct grptmpltstruct{ /* struct contains all information about a given */
- /* book. remember "group/grp" == book in all this*/
- long ok;
- struct indexlist *nameptr;
- struct wordlist *keywords;
- struct pagestruct *firstpage;
- struct pagestruct *lastpage;
- struct grptmpltstruct *nextgrp;
- struct grptmpltstruct *prevgrp;
- struct filestruct *helpfile;
- float covercolor[3]; /* red, blue, green 0 to 1.0 */
- short arttype;
- short numpages;
- short numkey;
- };
-
- struct grpliststruct{
- struct grptmpltstruct *grpptr;
- struct grpliststruct *next;
- struct grpliststruct *prev;
- float x;
- float y;
- };
-
- typedef float MyPoint[3];
- extern MyPoint *icon_verts;
-
- extern int lastvertex;
-
-
-
- extern struct indexlist *Index; /* ptr to head of MASTER KEYWORD LIST */
- extern struct icntmpltstruct *firsticon; /* ptr to head of MASTER ICON LIST */
- extern struct icntmpltstruct *lasticon;
- extern struct icntmpltstruct *curicon;
- extern struct grptmpltstruct *firstgroup; /* ptr to head of MASTER BOOK LIST */
- extern struct grptmpltstruct *lastgroup; /* NOTE: "group" ==/means book */
- extern struct pagestruct *selectedpage;
- extern struct pagestruct *leftpage; /* global ptrs to left and right */
- extern struct pagestruct *rightpage; /* pages of currently opened book */
- extern struct pagestruct *middlepage;
- extern struct pagestruct *curnewpage;
- extern struct grptmpltstruct *curgroup; /* points to currently opened book */
- extern struct grptmpltstruct *newgrpptr;
- extern struct filestruct *headfile; /* actual files associated w/ea demo */
- /*
- extern struct iconstruct *iconlist;
- */
- extern struct iconstruct *newgroupiconlist, *newgrouplasticon;
- extern struct iconstruct *seliconptr;
- extern struct pagestruct *prevpage; /* used to unselect the prev selected icon */
-